package com.czg.designmode.state;

/**
 * 售光状态类
 *
 * @author chenzhigang
 */
public class SoldOutState implements State {

    private CandyMachine mCandyMachine;

    public SoldOutState(CandyMachine mCandyMachine) {
        this.mCandyMachine = mCandyMachine;
    }

    @Override
    public void insertCoin() {
        System.out.println("you can't insert coin,the machine sold out!");
    }

    @Override
    public void returnCoin() {
        System.out.println("you can't return,you haven't inserted a coin yet!");
    }

    @Override
    public void turnCrank() {
        System.out.println("you turned,but there are no candies!");
    }

    @Override
    public void dispense() {
    }

    @Override
    public void printState() {
        System.out.println("***SoldOutState***");
    }

}